<?php echo $this->fetch('header.html'); ?>
<script type="text/javascript">
//<!CDATA[
$(function(){
    // multi-select mall_gcategory
    $('#gcategory').length>0 && gcategoryInit("gcategory");
});
//]]>
</script>
<div id="rightTop">
  <p>库存</p>
  <ul class="subnav">
    <li><?php if ($_GET['closed']): ?><a class="btn1" href="index.php?app=stock">所有库存</a><?php else: ?><span>所有库存</span><?php endif; ?></li>
    <li><?php if ($_GET['closed']): ?><span>禁售商品</span><?php else: ?><a class="btn1" href="index.php?app=stock&amp;closed=1">禁售商品</a><?php endif; ?></li>
  </ul>
</div>
<div class="tdare">
  <table width="100%" cellspacing="0" class="dataTable">
    <?php if ($this->_var['stock_list']): ?>
    <tr class="tatr1">
      <td width="10%" class="firstCell"><input type="checkbox" class="checkall" /></td>
      <td width="30%"><span ectype="order_by" fieldname="stock_name">库存名</span></td>
      <td>操作</td>
    </tr>
    <?php endif; ?>
    <?php $_from = $this->_var['stock_list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }; $this->push_vars('', 'stock');if (count($_from)):
    foreach ($_from AS $this->_var['stock']):
?>
    <tr class="tatr2">
      <td class="firstCell"><input type="checkbox" class="checkitem" value="<?php echo $this->_var['stock']['adminstock_id']; ?>"/></td>
      <td><?php echo $this->_var['stock']['stock_name']; ?></td>
      <td><a href="index.php?app=stock&amp;act=edit&amp;id=<?php echo $this->_var['stock']['adminstock_id']; ?>">编辑</a></td>
    </tr>
    <?php endforeach; else: ?>
    <tr class="no_data info">
      <td colspan="8">没有符合条件的记录</td>
    </tr>
    <?php endif; unset($_from); ?><?php $this->pop_vars();; ?>
  </table>
  <?php if ($this->_var['stock_list']): ?>
  <div id="dataFuncs">
    <div id="batchAction" class="left paddingT15"> <?php if (! $_GET['closed']): ?>
          &nbsp;&nbsp;<?php endif; ?>
      <input class="formbtn batchButton" type="button" value="删除" name="id" uri="index.php?app=goods&act=drop&ret_page=<?php echo $this->_var['page_info']['curr_page']; ?>" presubmit="confirm('您确定要删除该商品吗（不可恢复）？')" />
    </div>
    <div class="pageLinks"><?php echo $this->fetch('page.bottom.html'); ?></div>
   <?php endif; ?>
  </div>
  <div class="clear"></div>
</div>
<?php echo $this->fetch('footer.html'); ?>